home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Environments / SmallEiffel 0.3.3 / SmallEiffel 68k / lib_test / test_none1.e < prev    next >
Encoding:
Text File  |  1996-06-13  |  761 b   |  48 lines  |  [TEXT/EDIT]

  1. -- Part of SmallEiffel -- Read DISCLAIMER file -- Copyright (C) 
  2. -- Dominique COLNET and Suzanne COLLIN -- colnet@loria.fr
  3. --
  4. class TEST_NONE1
  5.  
  6. creation make
  7.    
  8. feature 
  9.    
  10.    make is
  11.       do
  12.      dummy := 1;
  13.      is_true(foo = Void);
  14.      is_true(bar(foo) = foo);
  15.       end;
  16.  
  17. feature {NONE}
  18.    
  19.    dummy: INTEGER;
  20.  
  21.    foo: NONE is
  22.       do
  23.      if dummy = 1 then
  24.         Result := Void;
  25.      end;
  26.       end;
  27.  
  28.    bar(arg: NONE): NONE is
  29.       do
  30.      Result := arg;
  31.       end;
  32.  
  33.    is_true(b: BOOLEAN) is
  34.       do
  35.      cpt := cpt + 1;
  36.      if not b then
  37.         std_output.put_string("TEST_NONE1: ERROR Test # ");
  38.         std_output.put_integer(cpt);
  39.         std_output.put_string("%N");
  40.      else
  41.         --std_output.put_string("Yes%N");
  42.      end;
  43.       end;
  44.    
  45.    cpt: INTEGER;
  46.    
  47. end -- TEST_NONE1
  48.